<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>champ</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 16/12/2004</div>
    <p>
      <b>champ</b> - 2D vector field plot</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>champ(x,y,fx,fy,[arfact,rect,strf])</tt>
      </dd>
      <dd>
        <tt>champ(x,y,fx,fy,&lt;opt_args&gt;)</tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>x,y</b>
        </tt>: two vectors which define the grid.</li>
      <li>
        <tt>
          <b>fx</b>
        </tt>: a matrix which describes the x component of the vector field.
          <tt>
          <b>fx(i,j)</b>
        </tt> is the x component of the vector field at point
          <tt>
          <b>(x(i),y(j))</b>
        </tt>.</li>
      <li>
        <tt>
          <b>fy</b>
        </tt>: a matrix which describes the y component of the vector field.
          <tt>
          <b>fy(i,j)</b>
        </tt> is the y component of the vector field at point
          <tt>
          <b>(x(i),y(j))</b>
        </tt>.</li>
      <li>
        <tt>
          <b>&lt;opt_args&gt;</b>
        </tt>: This represents a sequence of statements 
         <tt>
          <b>key1=value1,key2=value2</b>
        </tt>,... where <tt>
          <b>key1</b>
        </tt>,
          <tt>
          <b>key2,...</b>
        </tt> can be one of the following: arfact, rect,
          strf (see below).</li>
      <li>
        <tt>
          <b>arfact</b>
        </tt>: an optional argument of type real which gives a scale factor
          for the display of the arrow heads on the plot (default value is
          1.0).</li>
      <li>
        <tt>
          <b>rect</b>
        </tt>: a vector <tt>
          <b>rect=[xmin,ymin,xmax,ymax]</b>
        </tt> which gives
          the boundaries of the graphics frame to use.</li>
      <li>
        <tt>
          <b>strf</b>
        </tt>: a string of length 3 "xyz" which has the same meaning as the
          <tt>
          <b>strf</b>
        </tt> parameter of <tt>
          <b>plot2d</b>
        </tt>. The first
          character x has no effect with <tt>
          <b>champ</b>
        </tt>.</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>champ</b>
      </tt> draws a 2D vector field. The length of the arrows is
    proportional to the intensity of the field.</p>
    <p>If you want colored arrows with the color of the arrows depending on
    the intensity of the field, use <tt>
        <b>champ1</b>
      </tt>.</p>
    <p>Enter the command <tt>
        <b>champ()</b>
      </tt> to see a demo.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

// using rect as plot boundaries 
champ(-5:5,-5:5,rand(11,11),rand(11,11),rect=[-10,-10,10,10],arfact=2)
// using (x,y) to get boundaries 
clf()
champ(-5:5,-5:5,rand(11,11),rand(11,11),2,[-10,-10,10,10],"021")
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="champ1.htm">
        <tt>
          <b>champ1</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="fchamp.htm">
        <tt>
          <b>fchamp</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="plot2d.htm">
        <tt>
          <b>plot2d</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>J.Ph.C.</p>
  </body>
</html>
